import Vue from 'vue'

import App from './App'
import plugins from './plugins' // plugins
// import store from './store' // store
import uView from "uview-ui"
import './uni.promisify.adaptor'
import './permission' // permission
import { navTo, showToast, showSuccess, showError, getShareUrlParams, checkModuleKey, checkModules } from './core/app'

Vue.use(plugins)
Vue.use(uView)
// uni.$u.config.unit = 'rpx'
// 挂载全局函数
Vue.prototype.$toast = showToast
Vue.prototype.$success = showSuccess
Vue.prototype.$error = showError
Vue.prototype.$navTo = navTo
Vue.prototype.$getShareUrlParams = getShareUrlParams
Vue.prototype.$checkModule = checkModuleKey
Vue.prototype.$checkModules = checkModules
Vue.config.productionTip = false
// Vue.prototype.$store = store

// 图片地址
const baseUrl = ''
const _baseUrl = ''
Vue.prototype.$imgUrl = (url) => baseUrl + url
Vue.prototype.$_imgUrl = (url) => _baseUrl + url

App.mpType = 'app'

const app = new Vue({
    ...App
})

app.$mount()
